import React from "react";
import {
    HashRouter, Route, Switch
} from "react-router-dom";

// 登录页
import Login from '../view/login/login';
import Index from '../view/index/index';
import User from '../view/user/user';
import Image from '../view/image/image'


const BasicRoute = () => ((
    <HashRouter>
        <Switch>
            <Route exact path="/" component={Login}></Route>
            <Route path="/index" component={() => (
                <Index>
                    <Route path="/index/user" component={User}></Route>
                    <Route path="/index/image" component={Image}></Route>
                </Index>
            )}>
            </Route>
        </Switch>
    </HashRouter>
)
)

export default BasicRoute;
